package com.jc.redis.serialize.kryo;

import com.esotericsoftware.kryo.Kryo;
import org.springframework.beans.factory.config.AbstractFactoryBean;

/**
 * Created by starmezhh on 16/7/25.
 */
public class KryoSerializerFactoryBean extends AbstractFactoryBean<KryoSerializer>{

    public Class<?> getObjectType() {
        return KryoSerializer.class;
    }

    protected KryoSerializer createInstance() throws Exception {
        Kryo kryo = new Kryo();
        return new KryoSerializer(kryo);
    }
}
